function DateFilter(cookie) {

	this.date = null;

	this.readCookie = function() {
		var dateCookie = $.jqx.cookie.cookie(cookie);
		if(dateCookie != null) {
			this.date = new Date(dateCookie);
		}
	};

	this.setDate = function(date) {
		if(this.date == null) {
			if(date != null) {
				this.date = date;
				$.jqx.cookie.cookie(cookie, date);
				$(this).trigger('change');
			}
		} else if(date == null || this.date.getTime() != date.getTime()) {
			this.date = date;
			$.jqx.cookie.cookie(cookie, date);
			$(this).trigger('change');
		}
	};
};